<?php
	include_once ('db.conf');

/* Connect to a MySQL server */
		$link = mysqli_connect(DBHOST,DBUSER,DBPASS,DBDBNAME);
		
		$userlogin=$_POST["cellnum"];
		$firstname=$_POST["firstname"];
		$lastname=$_POST["lastname"];
		$email=$_POST["email"];
		$yearofbirth=$_POST["yearofbirth"];
		$gender=$_POST["gender"];
		$bankaccount=$_POST["bankaccount"];
		$regpassword=$_POST["regpassword"];
		$points=$_POST["points"];
		
		if($yearofbirth=='')$yearofbirth=0;
		$query="call updateCustomerAccount('".$userlogin."','".$firstname."','".$lastname."','".$points."','".$bankaccount."','".$email."','".$yearofbirth."','".$gender."','".$regpassword."');";
		//echo $query;
		if($result = mysqli_query($link,$query ))$picovina=555;

		
		echo'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New customer registration</title>

<script type="text/javascript" language="JavaScript"><!--
function kontrola()
{
	var cell = self.document.forms.form1.cellnum.value;
	var email = self.document.forms.form1.email.value;
	var bankaccount = self.document.forms.form1.bankaccount.value;
	var regpassword = self.document.forms.form1.regpassword.value;
	var regretypepassword = self.document.forms.form1.regretypepassword.value;

    var is_ok = false;
    if ((cell != "")&&(email != "")&&(bankaccount != "")&&(regpassword != "")&&(regpassword ==regretypepassword )) is_ok = true;
	
	
	if (is_ok == false) alert("Sorry something is wrong or missing!");
    return is_ok; }
// -->
</script>


<style type="text/css">
<!--
.style5 {color: #0066FF; font-size: 24px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
.style7 {
	font-size: 24px;
	font-family: Arial, Helvetica, sans-serif;
	color: #0066FF;
}
.style8 {
	font-size: 24px;
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
}
.style12 {
	font-size: 18;
}
.style17 {font-size: 16px}
.style18 {font-family: Arial, Helvetica, sans-serif}
.style20 {color: #FFFFFF}
-->
</style>
</head>

<body>
<p><img src="pics/main_logo_with_text_1010x12.gif" width="1010" height="124" /></p>

<table width="100%" border="0">
  <tr>
    <td colspan="2" align="left" bgcolor="#FF9900"><blockquote>
      <p><span class="style5"> Succes, your data were changed :-)</span></p>
    </blockquote></td>
  </tr>
  <tr>
    <td width="25%" rowspan="3" align="center" valign="top"><div align="left">

      <blockquote>&nbsp; </blockquote>
    </div>      <blockquote>
      <p align="left" class="style7">Now you can go back to sign in.</p>
    </blockquote></td>
    <td width="75%" valign="top" bgcolor="#FF9900">&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#FF9900" class="style12"><div align="center" class="style18">
      <p class="style12"><a href="index.html" class="style20">home</a></p>
    </div></td>
  </tr>

  
  
  
  
  
  
</table>
</body>
</html>
';


?>